
function linkedPage(totalPage,currentPage){
	 var currentPage = parseInt(currentPage);//当前页
	 var totalPage = parseInt(totalPage);//总页数
	var content='';
      content += '<div class="mar_page clearfix" id="marId"><p class="page r"><span class="pre_page" id="spanId">';
	if(currentPage>1){
		content = content+'<a href="javascript:toAccountPage('+(currentPage-1)+');">上一页</a></span>';
	}else{
		content = content+'上一页</span>';
	}
	if(totalPage>7){
		if(currentPage<4){
			for(var i= 1;i<=7;i++){
				if(currentPage==i){
					content = content+'<a id="aId1" href="javascript:toAccountPage('+i+');" class="page_num active"id="'+i+'">'+i+'</a>';	
				}else{
					content = content+'<a id="aId2" href="javascript:toAccountPage('+i+');" class="page_num"  id="'+i+'">'+i+'</a>';	
				}
			}
		}else if(currentPage+3<=totalPage){
			for(var i=(currentPage-3);i<=(currentPage+3);i++){
				if(currentPage==i){
					content = content+'<a id="aId1" href="javascript:toAccountPage('+i+');" class="page_num active"id="'+i+'">'+i+'</a>';	
				}else{
					content = content+'<a id="aId2" href="javascript:toAccountPage('+i+');" class="page_num" id="'+i+'">'+i+'</a>';	
				}
			}
		}else{
			for(var i=(totalPage-6);i<=totalPage;i++){
				if(currentPage==i){
					content = content+'<a id="aId1" href="javascript:toAccountPage('+i+');" class="page_num active"id="'+i+'">'+i+'</a>';	
				}else{
					content = content+'<a id="aId2" href="javascript:toAccountPage('+i+');" class="page_num" id="'+i+'">'+i+'</a>';	
				}
			}
		}
	}else{
		for(var i= 1;i<=totalPage;i++){
			if(currentPage==i){
				content = content+'<a id="aId1" href="javascript:toAccountPage('+i+');" class="page_num active"id="'+i+'">'+i+'</a>';	
			}else{
				content = content+'<a id="aId2" href="javascript:toAccountPage('+i+');" class="page_num" id="'+i+'">'+i+'</a>';	
			}
		}
	}
	content = content+'<span id="spanId2" class="next_page">';
	if(currentPage<totalPage){
		content = content+'<a href="javascript:toAccountPage('+(currentPage+1)+');">下一页</a></span>';
	}else{
		content = content+'下一页</span>';
	}
	content +='</p></div>';
	content +='<div></div>';
	return content;
	
};